.TH "Error Handling" 3spotify "Wed Mar 28 2012" "libspotify" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Error Handling \- 
.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef enum \fBsp_error\fP \fBsp_error\fP"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBsp_error\fP { \fBSP_ERROR_OK\fP =  0, \fBSP_ERROR_BAD_API_VERSION\fP =  1, \fBSP_ERROR_API_INITIALIZATION_FAILED\fP =  2, \fBSP_ERROR_TRACK_NOT_PLAYABLE\fP =  3, \fBSP_ERROR_BAD_APPLICATION_KEY\fP =  5, \fBSP_ERROR_BAD_USERNAME_OR_PASSWORD\fP =  6, \fBSP_ERROR_USER_BANNED\fP =  7, \fBSP_ERROR_UNABLE_TO_CONTACT_SERVER\fP =  8, \fBSP_ERROR_CLIENT_TOO_OLD\fP =  9, \fBSP_ERROR_OTHER_PERMANENT\fP =  10, \fBSP_ERROR_BAD_USER_AGENT\fP =  11, \fBSP_ERROR_MISSING_CALLBACK\fP =  12, \fBSP_ERROR_INVALID_INDATA\fP =  13, \fBSP_ERROR_INDEX_OUT_OF_RANGE\fP =  14, \fBSP_ERROR_USER_NEEDS_PREMIUM\fP =  15, \fBSP_ERROR_OTHER_TRANSIENT\fP =  16, \fBSP_ERROR_IS_LOADING\fP =  17, \fBSP_ERROR_NO_STREAM_AVAILABLE\fP =  18, \fBSP_ERROR_PERMISSION_DENIED\fP =  19, \fBSP_ERROR_INBOX_IS_FULL\fP =  20, \fBSP_ERROR_NO_CACHE\fP =  21, \fBSP_ERROR_NO_SUCH_USER\fP =  22, \fBSP_ERROR_NO_CREDENTIALS\fP =  23, \fBSP_ERROR_NETWORK_DISABLED\fP =  24, \fBSP_ERROR_INVALID_DEVICE_ID\fP =  25, \fBSP_ERROR_CANT_OPEN_TRACE_FILE\fP =  26, \fBSP_ERROR_APPLICATION_BANNED\fP =  27, \fBSP_ERROR_OFFLINE_TOO_MANY_TRACKS\fP =  31, \fBSP_ERROR_OFFLINE_DISK_CACHE\fP =  32, \fBSP_ERROR_OFFLINE_EXPIRED\fP =  33, \fBSP_ERROR_OFFLINE_NOT_ALLOWED\fP =  34, \fBSP_ERROR_OFFLINE_LICENSE_LOST\fP =  35, \fBSP_ERROR_OFFLINE_LICENSE_ERROR\fP =  36 }"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "const char * \fBsp_error_message\fP (\fBsp_error\fP error)"
.br
.in -1c
.SH "Detailed Description"
.PP 
All functions in libspotify use the same set of error codes\&. Most of them return an error code, and let the result of the operation be stored in an out-parameter\&. 
.SH "Typedef Documentation"
.PP 
.SS "typedef enum \fBsp_error\fP  \fBsp_error\fP"
Error codes returned by various functions 
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBsp_error\fP"
Error codes returned by various functions 
.PP
\fBEnumerator: \fP
.in +1c
.TP
\fB\fISP_ERROR_OK \fP\fP
No errors encountered\&. 
.TP
\fB\fISP_ERROR_BAD_API_VERSION \fP\fP
The library version targeted does not match the one you claim you support\&. 
.TP
\fB\fISP_ERROR_API_INITIALIZATION_FAILED \fP\fP
Initialization of library failed - are cache locations etc\&. valid? 
.TP
\fB\fISP_ERROR_TRACK_NOT_PLAYABLE \fP\fP
The track specified for playing cannot be played\&. 
.TP
\fB\fISP_ERROR_BAD_APPLICATION_KEY \fP\fP
The application key is invalid\&. 
.TP
\fB\fISP_ERROR_BAD_USERNAME_OR_PASSWORD \fP\fP
Login failed because of bad username and/or password\&. 
.TP
\fB\fISP_ERROR_USER_BANNED \fP\fP
The specified username is banned\&. 
.TP
\fB\fISP_ERROR_UNABLE_TO_CONTACT_SERVER \fP\fP
Cannot connect to the Spotify backend system\&. 
.TP
\fB\fISP_ERROR_CLIENT_TOO_OLD \fP\fP
Client is too old, library will need to be updated\&. 
.TP
\fB\fISP_ERROR_OTHER_PERMANENT \fP\fP
Some other error occurred, and it is permanent (e\&.g\&. trying to relogin will not help) 
.TP
\fB\fISP_ERROR_BAD_USER_AGENT \fP\fP
The user agent string is invalid or too long\&. 
.TP
\fB\fISP_ERROR_MISSING_CALLBACK \fP\fP
No valid callback registered to handle events\&. 
.TP
\fB\fISP_ERROR_INVALID_INDATA \fP\fP
Input data was either missing or invalid\&. 
.TP
\fB\fISP_ERROR_INDEX_OUT_OF_RANGE \fP\fP
Index out of range\&. 
.TP
\fB\fISP_ERROR_USER_NEEDS_PREMIUM \fP\fP
The specified user needs a premium account\&. 
.TP
\fB\fISP_ERROR_OTHER_TRANSIENT \fP\fP
A transient error occurred\&. 
.TP
\fB\fISP_ERROR_IS_LOADING \fP\fP
The resource is currently loading\&. 
.TP
\fB\fISP_ERROR_NO_STREAM_AVAILABLE \fP\fP
Could not find any suitable stream to play\&. 
.TP
\fB\fISP_ERROR_PERMISSION_DENIED \fP\fP
Requested operation is not allowed\&. 
.TP
\fB\fISP_ERROR_INBOX_IS_FULL \fP\fP
Target inbox is full\&. 
.TP
\fB\fISP_ERROR_NO_CACHE \fP\fP
Cache is not enabled\&. 
.TP
\fB\fISP_ERROR_NO_SUCH_USER \fP\fP
Requested user does not exist\&. 
.TP
\fB\fISP_ERROR_NO_CREDENTIALS \fP\fP
No credentials are stored\&. 
.TP
\fB\fISP_ERROR_NETWORK_DISABLED \fP\fP
Network disabled\&. 
.TP
\fB\fISP_ERROR_INVALID_DEVICE_ID \fP\fP
Invalid device ID\&. 
.TP
\fB\fISP_ERROR_CANT_OPEN_TRACE_FILE \fP\fP
Unable to open trace file\&. 
.TP
\fB\fISP_ERROR_APPLICATION_BANNED \fP\fP
This application is no longer allowed to use the Spotify service\&. 
.TP
\fB\fISP_ERROR_OFFLINE_TOO_MANY_TRACKS \fP\fP
Reached the device limit for number of tracks to download\&. 
.TP
\fB\fISP_ERROR_OFFLINE_DISK_CACHE \fP\fP
Disk cache is full so no more tracks can be downloaded to offline mode\&. 
.TP
\fB\fISP_ERROR_OFFLINE_EXPIRED \fP\fP
Offline key has expired, the user needs to go online again\&. 
.TP
\fB\fISP_ERROR_OFFLINE_NOT_ALLOWED \fP\fP
This user is not allowed to use offline mode\&. 
.TP
\fB\fISP_ERROR_OFFLINE_LICENSE_LOST \fP\fP
The license for this device has been lost\&. Most likely because the user used offline on three other device\&. 
.TP
\fB\fISP_ERROR_OFFLINE_LICENSE_ERROR \fP\fP
The Spotify license server does not respond correctly\&. 
.SH "Function Documentation"
.PP 
.SS "const char* \fBsp_error_message\fP (\fBsp_error\fPerror)"
Convert a numeric libspotify error code to a text string\&. The error message is in English\&. This function is useful for logging purposes\&.
.PP
\fBParameters:\fP
.RS 4
\fIerror\fP The error code to lookup 
.RE
.PP

.PP
\fBExamples: \fP
.in +1c
\fBbrowse\&.c\fP, \fBjukebox\&.c\fP, and \fBsearch\&.c\fP\&.
.SH "Author"
.PP 
Generated automatically by Doxygen for libspotify from the source code\&.
